package com.itheima.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class ServletContextListenerDemo1 implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("----------------");
        System.out.println("服务器启动了");
        ServletContext sc = sce.getServletContext();
        String value = sc.getInitParameter("encoding");

        System.out.println(value);
    }
}
